From dfae53c406d155e411ed5dd1639354856f389030 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 17 Sep 2014 08:27:41 -0700 Subject: [PATCH] Fix some more deprecation warnings --- tests/test_cargo.rs | 2 +- tests/test_cargo_compile_git_deps.rs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_cargo.rs b/tests/test_cargo.rs index cb5334c6b..a4ce15a98 100644 --- a/tests/test_cargo.rs +++ b/tests/test_cargo.rs @@ -26,7 +26,7 @@ fn fake_executable(proj: ProjectBuilder, dir: &Path, name: &str) -> ProjectBuild // installation as we don't want it to muck with the --list tests fn new_path() -> Vec { let path = os::getenv_as_bytes("PATH").unwrap_or(Vec::new()); - os::split_paths(path).move_iter().filter(|p| { + os::split_paths(path).into_iter().filter(|p| { !p.join(format!("cargo{}", os::consts::EXE_SUFFIX)).exists() }).collect() } diff --git a/tests/test_cargo_compile_git_deps.rs b/tests/test_cargo_compile_git_deps.rs index 9c4bf20c6..181de8f9b 100644 --- a/tests/test_cargo_compile_git_deps.rs +++ b/tests/test_cargo_compile_git_deps.rs @@ -37,7 +37,7 @@ fn add(repo: &git2::Repository) { // as well, and then fail b/c they're a directory. As a stopgap, we just // ignore all submodules. let mut s = repo.submodules().unwrap(); - for submodule in s.mut_iter() { + for submodule in s.iter_mut() { submodule.add_to_index(false).unwrap(); } let mut index = repo.index().unwrap(); @@ -459,14 +459,14 @@ test!(two_revs_same_deps { }).assert(); let repo = git2::Repository::open(&bar.root()).unwrap(); - let rev1 = repo.revparse_single("HEAD").unwrap().id().to_string(); + let rev1 = repo.revparse_single("HEAD").unwrap().id(); // Commit the changes and make sure we trigger a recompile File::create(&bar.root().join("src/lib.rs")).write_str(r#" pub fn bar() -> int { 2 } "#).assert(); add(&repo); - let rev2 = commit(&repo).to_string(); + let rev2 = commit(&repo); let foo = project("foo") .file("Cargo.toml", format!(r#" @@ -481,7 +481,7 @@ test!(two_revs_same_deps { [dependencies.baz] path = "../baz" - "#, bar.url(), rev1.as_slice().trim()).as_slice()) + "#, bar.url(), rev1).as_slice()) .file("src/main.rs", r#" extern crate bar; extern crate baz; @@ -502,7 +502,7 @@ test!(two_revs_same_deps { [dependencies.bar] git = '{}' rev = "{}" - "#, bar.url(), rev2.as_slice().trim()).as_slice()) + "#, bar.url(), rev2).as_slice()) .file("src/lib.rs", r#" extern crate bar; pub fn baz() -> int { bar::bar() } -- 2.30.2